package xyz.lwm.lazycat.web.annocation;

import xyz.lwm.lazycat.utility.reflect.AliasTo;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 路径参数注解
 *
 * @author lwm
 */
@Target({ElementType.PARAMETER, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface PathParam {

	/**
	 * path 中的参数名称
	 * <pre>{@code
	 * /get/{id}
	 * @PathParam("id")
	 * }</pre>
	 *
	 */
	@AliasTo("name")
	String value() default "";

	@AliasTo("value")
	String name() default "";

}